﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ARR.Entities;
using System.Transactions;
using ARR.DataModel.Repositories;

namespace ARR.Services.Domain
{
    public static class AuditTrailsDomain
    {
        public static void SaveAuditTrails(List<AuditTrail> auditTrails)
        {
            using (TransactionScope scope = new TransactionScope())
            {
                foreach(var audit in auditTrails)
                {
                    AuditTrailsRepository.Insert(audit.GetRow());
                }

                scope.Complete();
            }
        }
    }
}
